Skip to content

cmake: Include "-pthread" in the pkg-config file if using pthreads #832

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mstorsjo
Copy link

@mstorsjo mstorsjo commented May 5, 2025

This makes sure that users of the library pass the right linker flags if linking libflac statically, with a mingw toolchain that doesn't automatically link in pthreads.

This makes sure that users of the library pass the right linker
flags if linking libflac statically, with a mingw toolchain that
doesn't automatically link in pthreads.
ePirat pushed a commit to videolan/vlc that referenced this pull request May 6, 2025
This fixes linking with llvm-mingw (or any mingw distribution that
doesn't default to linking in winpthreads).

This wasn't noticed in the upstream VLC CI, as it builds with
extras/packages/win32/build.sh, which passes in -Wl,-l:libpthread.a
in VLC_LDFLAGS (in order to prefer linking winpthreads statically,
rather than dynamically, for libraries that do use winpthreads).

This patch has been sent upstream in
xiph/flac#832.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant